<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 14408
  Date: 2022/1/12
  Time: 17:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>菜品类别管理</title>
    <script type="text/javascript" src="../js/jquery.js"></script>
</head>
<body>
<div align="center">
    <table border="0" width="800" id="table1" bgcolor="#CCFFCC">
        <tr>
            <td align="center">类别ID</td>
            <td align="center">类别名称</td>
            <td align="center">　</td>
            <td align="center">　</td>
        </tr>
       <c:forEach items="${sessionScope.categoryList}" var="category">
           <tr>
               <td bgcolor="#FFE3BB" align="center" height="20">${category.id}</td>
               <td bgcolor="#FFE3BB" align="center" height="20">${category.category}</td>
               <td bgcolor="#FFE3BB" align="center" height="20"><a href="">修改</a></td>
               <td bgcolor="#FFE3BB" align="center" height="20"><a href="">删除</a></td>
           </tr>
       </c:forEach>
        <tr>
            <td bgcolor="#FFE3BB" align="center" colspan="4" height="25"><a href="admin/addtype.jsp">添加新类别</a></td>
        </tr>
    </table>
</div>
<script>
    $(function(){
        //执行代码
        $.ajax({
            type:"GET",
            url:"http://localhost:8080/category/select.do",

            success: function (result) {
                console.log("category")
            }
        })
    })
</script>
</body>
</html>
